package com.my.chapter15;

public class practice2 {
    public static void main(String[] args) {
        Holder1<String> h =
                new Holder1<String>("A", "B", "C");
        System.out.println(h.getA());
        System.out.println(h.getB());
        System.out.println(h.getC());
        h.setC("D");
        System.out.println(h.getC());
    }
}

class Holder1<T>{
    private T a,b,c;
    public Holder1(T a,T b,T c){
        this.a = a;
        this.b = b;
        this.c = c;
    }
    public void setA(T a){
        this.a = a;
    }
    public void setB(T b){
        this.b = b;
    }
    public void setC(T c){
        this.c = c;
    }
    public T getA() { return a; }
    public T getB() { return b; }
    public T getC() { return c; }
}
